TsgDXFExport
Unit: DXFExport
Description
The TsgDXFExport
class provides API for export yours vector graphics files to DXF files.
Learn more about DXF
DXF is an acronym for Drawing eXchange Format. DXF is a widely used file format for exchanging 2D and 3D CAD data. It's not an open format but owned by AutoDesk Inc. who used it for their program AutoCAD. With every new version of AutoCAD the definition of DXF is changed but nevertheless there are many of programs which are capable of reading and writing some form of DXF. DXF is an ASCII replication of the contents of a drawing file enabling the interchange of files from one CAD system to another program. DXF import/export is supported by a wide variety of applications, ranging from CAD products to word processors, desktop publishing and illustration tools. The DXF CAD format has become the de facto standard in PC based CAD industry with many other CAD systems able to read and write this format too.
DXF Exporter allows programmers to create DXF files as easy as possible. All you need is to draw image using Windows GDI functions onto DXF Exporter’s DC or make a metafile and give it to the Exporter. DXF Exporter reads Windows Metafile structure and makes DXF file automatically.
For specifying of AutoCAD version use AutoCADVer property.
Properties
Properties | Descriptions |
---|---|
AutoCADVer | The property defines using DXF-file format. |
Block | The property returns the name of the BLOCK that is currently being filled with entities. |
Canvas | The property points to the TCanvas object which can be used for drawing with the standard TCanvas methods. |
CurrentLayer | The property obtains current layer. |
DefaultHatchPatternScale | The property sets and gets DefaultHatchPatternScale. |
DefaultLTypeScale | The property sets and gets DefaultLTypeScale. |
IsParseWhite | The property sets if white rectangles hide entities (parts of entities) lying under them. |
Layers | The property sets and gets the list of layers. |
Millimeters | The property sets and gets measurement system. |
Offset | The property sets and gets the hatch pattern line offset. |
PenWidthRatio | The property sets and gets pen’s width ratio. |
UndefinedInserts | The property returns a list of undefined INSERT entities. |
UnitSize | The property defines scale factor for unit size. |
Use01MM | The property sets if loading coordinates are divided by 100. |
UseMetafileRatio | The property defines whether the ratio between height and width of metafile should be used. |
UseUnicode | The property can be used for correct displaying Unicode fonts. |
Methods
Methods | Descriptions |
---|---|
AddArc | The method adds the arc. |
AddCircle | The method adds the circle |
AddDimension | The method adds the dimension. |
AddEllipse | The method adds the ellipse. |
AddHatch | The method adds the hatch. |
AddLeader | The method adds the leader. |
AddLine | The method adds the line. |
AddLType | The method adds the linetype. |
AddMText | The method adds the Mtext. |
AddPixel | The method adds the pixel. |
AddPolyBezier | The methods adds the polybezier. |
AddPolyLine | The method adds the polyline. |
AddRectangle | The method adds the rectangle. |
AddSolid | The method adds the solid. |
AddText | The method adds the text. |
AddXref | The method adds the xref. |
BeginBlock | The method creates the block. |
Clear | The method destroys all entities in the instance. |
Create | Creates an instance of the TsgDXFExport class. |
Destroy | Destroys an instance of the TsgDXFExport class. |
EndBlock | The method closes the block. |
EndDraw | The method finished the drawing. |
Insert | The method creates and adds the insert entity. |
LoadFromFile | The method loads data from Windows metafile. |
LoadFromMetafile | The method loads data from TMetafile type instance. |
SaveToFile | The method saves the current data to DXF-file. |
SaveToStream | The method saves the current data to specified stream in DXF text format. |
SetLayerByString | The method sets current layer. |